{include(header)}
<script src="/common/js/kj.layer.js"></script>
<script>
kj.layer.move = function(id) {
	var obj = {};
	obj.title='移动分组';
	obj.type='iframe';
	obj.top = kj.y;
	obj.left = kj.x;
	obj.h=100;
	obj.w={$arr_group["maxlayer"]*50+150};
	if(obj.w < 200) obj.w=200;
	obj.url = "?app={$app}&app_module={$app_module}&app_act=move_open&id=" + id;
	obj.id = 'openmove_' + id;
	//obj.showbtnhide=true;
	kj.dialog(obj);
}
kj.onload(function(){
	kj.handler(document.documentElement,"mousedown",function(e){
		oEvent=e||event;
		kj.x=oEvent.clientX;
		kj.y=oEvent.clientY;
	});
});
function vote_item_callback(o) {
	if("id" in o) {
		kj.set("#id_url_item_id" , "value" , o.id);
		admin.refresh();
	}
}

</script>
<div class="pMenu" id="id_pMenu">
	<li style="font-weight:bold"><input type="hidden" name="url_item_id" value="{$admin_item['id']}" id="id_url_item_id"><span class="more1" onmouseover="kj.windiv({'id':'item_user_windiv','fid':this,'src':'common.php?app=vote&app_act=item'});" id="id_shop_user">活动：{if($admin_item['id']<1)}请选择{else}{$admin_item['name']}{/if}</span></li>
	<li class="sel" onclick="admin.act('');">管理</li>
	<li class = "x_btn"><a href="javascript:parent.thisjs.klkkdj_open('用户组-帮助','app=service&app_act=help&key=help.sys.user.group');" title="帮助"><img src="images/faq.gif"></a></li>
</div>
<div class="pMain" id="id_main">
	<div class="pLayer" id="id_layer">
	<li style="display:none" id="id_layer_default">
		<span class="xx_1"><input type="hidden" name="group_id[]" value=""><input type="hidden" name="group_id_layer[]" value="id_layer_default"><input type="hidden" name="pid[]" value=""><input type="text" name="group_sort[]" value="" class='pTxt1 pTxtL20'></span>
		<span class="xx_1"><input type="text" name="group_name[]" value="" class='pTxt1 pTxtL150'></span><span class="xx_1"><a href="javascript:kj.layer.add('#id_layer_default',50);"><img src="images/add.gif"></a>&nbsp;&nbsp;<a href="javascript:kj.layer.remove('id_layer_default');"><img src="images/romove.gif"></a></span></li>
	{foreach($arr_group["list"] as $item)}
	<li id="id_layer_{$item['group_id']}">
		<span class="xx_1"><input type="hidden" name="group_id[]" value="{$item['group_id']}"><input type="hidden" name="group_id_layer[]" value="id_layer_{$item['group_id']}"><input type="hidden" name="pid[]" value="{if($item['group_pid']>0)}id_layer_{$item['group_pid']}{/if}"><input type="text" name="group_sort[]" value="{$item['group_sort']}" class='pTxt1 pTxtL20'></span>
		<span class="xx_1"><input type="text" name="group_name[]" value="{$item['group_name']}" class='pTxt1 pTxtL150'></span><span class="xx_1"><a href="javascript:kj.layer.remove('id_layer_{$item['group_id']}');"><img src="images/romove.gif"></a></span></li>
	{/foreach}
	</div>
	<div class="pLayerAdd"><a href="javascript:kj.layer.add();"><img src="images/add.gif"> 添加</a></div>
</div>
<div class="pFootAct" id="id_pFootAct">
<li>
{if($this_limit->chk_act("update"))}&nbsp;<input type="button" name="dosubmit" value="保存" onclick="admin.frm_ajax('save_all');" class="pBtn">{/if}
</li>
</div>
<script>
{if($admin_item['id']<1)}
kj.onload(function(){
	var objx = kj.obj("#id_shop_user");
	kj.windiv({'id':'item_user_windiv','fid':objx,'src':'common.php?app=vote&app_act=item'});
	kj.handler("#windivitem_user_windiv_body","mouseout",function() {
		kj.show(this.parentNode);
		return;
	});
});
{/if}
</script>
{include(footer)}